package com.enjoyor.soa.traffic.server.efoms;

import com.enjoyor.soa.traffic.frame.configure.*;
import com.enjoyor.soa.traffic.server.efoms.dubbo.listener.ScheduleVideoPicStatus;
import com.enjoyor.soa.traffic.server.efoms.dubbo.listener.ScheduledGetDeviceService;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement
@EnableScheduling
@ComponentScan(basePackages = {"com.enjoyor.soa.traffic.core.efoms", "com.enjoyor.soa.traffic.server.efoms.dubbo"})
@Import({ AopConfig.class, ExceptionConfig.class, MyBatisConfig.class,
        UtilConfig.class, LoggerConfig.class, DubboConfig.class,StatusMonitorConfig.class })
public class EfomsServerApplication {
	
	public static ConfigurableApplicationContext context;
	public static void main(String[] args) throws Exception {
		context=SpringApplication.run(EfomsServerApplication.class, args);
		//context.addApplicationListener(new PushMsg());
		//context.getBean(ScheduleVideoPicStatus.class).getVideoPicStatus();
		//context.getBean(ScheduledGetDeviceService.class).getBayonetStatusScheduled();
	}
}
